﻿@model IEnumerable<TopArtMVC.Models.Post>
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
    ViewBag.Title = "UserProfile";
}
@section scripts{
  
    <script src="~/Scripts/topart.js"></script>
    <script src="~/Scripts/jquery-1.10.2.min.js"></script>
    <script src="~/Scripts/jquery.masonry.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#btnSubmit").click(function () {
                alert("Alert using jQuery");  
            });            
        });

</script>

}
@section Styles {
 
<link href="~/Content/bootstrap.css" rel="stylesheet" />
<link href="~/Content/bootstrap.min.css" rel="stylesheet" />
<link href="~/Content/Site.css" rel="stylesheet" />
}

<div class="jumbotron">
    <h1>Top Art</h1>
    <p class="lead">Congratulations @ViewBag.UserName .  You have been Authenticated. This is your Page!</p>  
</div>

<p>
    @Html.ActionLink("Create New", "Create")
 

</p>
<ul >
    @foreach(var item in Model)
    {
        <li>
            <div class="panel panel-default">
                <div class="panel-body">
                    @Html.DisplayFor(modelItem => item.UserID) <br/>
                    @Html.DisplayFor(modelItem => item.PostText)
                    <div id="player"></div>
                </div>
            </div>
        </li>
    }
</ul>
<table class="table">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.UserID)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.PostDate)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.PostText)
        </th>
        <th></th>
    </tr>

    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.UserID)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.PostDate)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.PostText)
            </td>
            <td>
                @Html.ActionLink("Edit", "Edit", new { id = item.ID }) |
                @Html.ActionLink("Details", "Details", new { id = item.ID }) |
                @Html.ActionLink("Delete", "Delete", new { id = item.ID })
            </td>
        </tr>
    }

</table>





